<template>
  <div>
    <!-- <router-view v-slot="{ Component, route }">
      <transition :name="route.meta.transitionName">
        <keep-alive v-if="$route.meta.keepAlive">
          <component :is="Component" />
        </keep-alive>
        <component :is="Component" v-else />
      </transition>
    </router-view> -->
      <!-- <loading /> -->
    <router-view></router-view>
  </div>
</template>

<script lang="ts">
import { defineComponent} from "vue";
import loading from '@/components/loading.vue';
export default defineComponent({
  name: "App",
  components:{loading}
});
</script>

<style>
#app {
  width: 100%;
  /* height: 100%; */
  overflow: hidden;
}
/*
    动画样式
    will-change: transform    优化渲染速度
*/

.slide-right-enter-active,
.slide-right-leave-active,
.slide-left-enter-active,
.slide-left-leave-active {
  will-change: transform;
  transition: all 0.5s;
  width: 100%;
  position: absolute;
  z-index: 99;
}
.slide-right-enter {
  opacity: 0;
  transform: translate3d(-100%, 0, 0);
}
.slide-right-leave-active {
  opacity: 0;
  transform: translate3d(100%, 0, 0);
}
.slide-left-enter {
  opacity: 0;
  transform: translate3d(100%, 0, 0);
}
.slide-left-leave-active {
  opacity: 0;
  transform: translate3d(-100%, 0, 0);
}

.zoom-fade-enter-active,
.zoom-fade-leave-active {
  transition: transform 0.35s, opacity 0.28s ease-in-out;
}

.zoom-fade-enter-from {
  opacity: 0;
  transform: scale(0.97);
}

.zoom-fade-leave-to {
  opacity: 0;
  transform: scale(1.03);
}
</style>